"""
Entity baseclass
"""

class Entity:
	""" The base class for any changing object in the created world. """
	def __init__(self):
		""" Simple constructor """
		self.attrs = {}
		
	def get_attr(self, _attr_name):
		if self.attrs.has_key(_attr_name):
			return self.attrs[_attr_name]
			
	def set_attr(self, _attr_name, _attr_value):
		self.attrs[_attr_name] = _attr_value
	
	def list_attr(self):
		for x in self.attrs:
			print x
			
	def has_attr(self, _attr):
		for x in self.attrs:
			if x == _attr:
				return True
		return None
		
	def update(self):
		pass
		
	def in_world(self):
		if self.world:
			return True
		else:
			return False
		
	